home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4082 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.1 KB

  1. Path: news.uh.edu!usenet
  2. From: Sensarn <txs53132@bayou.uh.edu>
  3. Newsgroups: comp.lang.c++
  4. Subject: Linking LIBs
  5. Date: 27 Jan 1996 20:45:30 GMT
  6. Organization: AEtna Insurance Agency
  7. Message-ID: <4ee2ta$6b3@masala.cc.uh.edu>
  8. NNTP-Posting-Host: sip-14115.public-dialups.uh.edu
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.1 (Windows; U; 16bit)
  13.  
  14.      I just started linking LIB files to my projects (TC++ 3.0).  The 
  15. programs work fine in TC, but I have a problem when they are run from 
  16. DOS.  After execution, the memory allocated for the program doesn't seem 
  17. to be freed.  Before execution, I have about 600k conventional memory 
  18. left.  After execution, I have about 160k (not enough to even run TC 
  19. again).  How do I stop this?
  20.  
  21. Steven Sensarn - txs53132@bayou.uh.edu
  22.  
  23. P.S.
  24. The first time I tried it, I stopped the program using exit(1).  The 
  25. second time, I merely used a 'for' loop like the following:
  26.  
  27. unsigned char done=0;
  28. do
  29. {
  30. ..
  31. } while(!done);
  32.  
  33. I added a line in the program that looked like this
  34.  
  35.     done=1;
  36.  
  37. The program worked great in TC, but not DOS.
  38.  
  39.  
  40.